import { Adventure } from '@/business/adventure/entities/adventure.entity';
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsNotEmpty, IsNumber, IsOptional } from 'class-validator';
export class CreateTaskDto {
  @ApiProperty({ description: '任务名称', example: '狩猎哥布林' })
  @IsNotEmpty({ message: '任务名称不能为空' })
  name: string;

  @ApiProperty({ description: '任务描述', example: '打败一只哥布林' })
  desc: string;

  @ApiProperty({ description: '任务等级', example: 1 })
  @IsNumber(undefined, { message: '任务等级为数字' })
  level: number;

  @ApiProperty({ description: '任务类型' })
  type: number;

  @ApiProperty({ description: '任务状态', example: 1 })
  status: number;

  @ApiProperty({ description: '领取的工会',example: [{id: 1}] })
  @IsOptional()
  adventure: Adventure[];
}
